package com.coffee.order.service.inquire.dao;

import com.coffee.order.api.inquire.query.InquireOrderQuery;
import com.coffee.order.api.inquire.req.SupplierOrderListReq;
import com.coffee.order.api.inquire.result.OrderListResult;
import com.coffee.order.api.inquire.result.SupplierSubOrderListResult;
import com.coffee.order.service.inquire.bean.InquireOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InquireOrderDao {
    public InquireOrder findById(Integer id);

    public InquireOrder findByOrderId(Integer orderId);

    public InquireOrder findByIdForUpdate(Integer id);

    public List<InquireOrder> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") InquireOrderQuery param);

    public List<InquireOrder> page(@Param("param") InquireOrderQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<InquireOrder> list(@Param("param") InquireOrderQuery param);

    public InquireOrder findFirst(@Param("param") InquireOrderQuery param);

    public Integer insert(InquireOrder param);

    Integer insertBatch(List<InquireOrder> list);

    public void updateById(@Param("param") InquireOrder param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

    Integer findListByMerchantCount(@Param("merchantId") Integer merchantId, @Param("status") String status);

    List<OrderListResult> findListByMerchant(@Param("merchantId") Integer merchantId, @Param("status") String status, @Param("offset") Integer offset, @Param("rows") Integer rows);

    List<SupplierSubOrderListResult> pageSupplierSubOrderListResult(@Param("param") SupplierOrderListReq param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    List<InquireOrder> getSupplierSubOrderListByOrderIdList(@Param("orderIdList") List<Integer> orderIdList);

    Integer pageSupplierOrderCount(@Param("param") SupplierOrderListReq param);

    List<Integer> findInquireOrderIdByOrderId(Integer orderId);
}